﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using IGGCore;

namespace IGGWindowApp.Panels
{
    public partial class PanelStars : UserControl
    {
        // EVENTS
        public delegate void ItemSelectedHandler(string item);
        public event ItemSelectedHandler ItemSelected;

        public PanelStars()
        {
            InitializeComponent();
        }

        private void panelTitle_ItemSelected(string item)
        {
            ItemSelected(item);
        }

        public void UpdateStars(Player[] stars)
        {
            lblStar1.Text = stars[0].NameDisplay + ", " + stars[0].TeamAbbr;
            lblStar2.Text = stars[1].NameDisplay + ", " + stars[1].TeamAbbr;
            lblStar3.Text = stars[2].NameDisplay + ", " + stars[2].TeamAbbr;
            //lblStar4.Text = stars[3].NameDisplay + ", " + stars[3].TeamAbbr;

            lblLine1.Text = stars[0].GameLines[0];
            lblLine1b.Text = stars[0].GameLines[1];
            lblLine2.Text = stars[1].GameLines[0];
            lblLine2b.Text = stars[1].GameLines[1];
            lblLine3.Text = stars[2].GameLines[0];
            lblLine3b.Text = stars[2].GameLines[1];
            //lblLine4.Text = stars[3].GameLines[0];
            //lblLine4b.Text = stars[3].GameLines[1];

            pic1.Image = stars[0].Pic;
            pic1.Refresh();
            pic2.Image = stars[1].Pic;
            pic2.Refresh();
            pic3.Image = stars[2].Pic;
            pic3.Refresh();
            //pic4.Image = stars[3].Pic;
            //pic4.Refresh();
        }

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void PanelResume_Load(object sender, EventArgs e)
        {

        }
    }
}
